<!--
 * @Description: 
 * @Author: yyh
 * @Date: 2021-09-16 14:32:16
 * @LastEditors: yyh
 * @LastEditTime: 2021-09-23 11:21:35
-->
<template>
  <div>
    <!-- 头部 -->
    <Header></Header>
    <!-- 体部 -->
    <div class="content">
      <div class="wrapper">
        <div class="title"></div>
        <div class="detailMsg">
          <!-- 发布时间 -->
          <!-- 阅读次数 -->
          <!-- 作者 -->
        </div>
        <!-- 在vue中 加载html页面或者 富文本的数据 v-html -->
        <div class="artContent" v-html="artData.content"></div>
        <!-- <div class="artContent">{{artData.content}}</div> -->
      </div>
    </div>
    <!-- 尾部 -->
    <Footer></Footer>
  </div>
</template>

<script>
import {get} from '../utils/request'
import Header from './components/Header.vue'
import Footer from './components/Footer.vue'
  export default {
    components:{
      Header,
      Footer
    },
    data() {
      return {
        artItem:{},
        artData:{}
      }
    },
    methods: {
      getArticleData(){
        get('/index/article/findById', {id: this.artItem.id}).then(res => {
          // console.log(res.data);
          this.artData = res.data
        })
      }
    },
    created() {
      this.artItem = this.$route.query
      this.getArticleData()
    },
  }
</script>

<style scoped>

</style>